﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>统计</title>
<script type="text/javascript" src="../../../_data/SysConfig.js"></script>
<script type="text/javascript" src="../../../_libs/jquery-min.js"></script>
<script type="text/javascript" src="../../../_libs/jquery.jtemplates.js"></script>
<script type="text/javascript" src="../../../scripts/jumbotcms.js?v4"></script>
<link type="text/css" rel="stylesheet" href="../../../style/global.css" />
<script type="text/javascript" src="../../../admin/otherpage/styles/common.js"></script>
<link type="text/css" rel="stylesheet" href="../../../admin/otherpage/styles/common.css" />
<script type="text/javascript">
var ccid = joinValue('ccid');//频道ID
var _y = q('y');
var _m = q('m');
var _t = q('t');
(function(){
	$(document).ready(function() {
		ajaxList();
	});
})();
function ajaxList()
{
	JumbotCms.Loading.show("正在加载数据,请等待...");
	$.ajax({
		type:		"get",
		dataType:	"json",
		data:		"time="+(new Date().getTime()),
		url:		"ajax.aspx?oper=ajaxGetList"+ccid+"&y="+_y+"&m="+_m+"&t="+_t,
		error:		function(XmlHttpRequest,textStatus, errorThrown){JumbotCms.Loading.hide();alert(XmlHttpRequest.responseText); },
		success:	function(d){
			switch (d.result)
			{
			case '-1':
				JumbotCms.Alert(d.returnval, "0", "top.window.location='" + site.Dir + "admin/login.htm';");
				break;
			case '0':
				JumbotCms.Alert(d.returnval, "0");
				break;
			case '1':
				JumbotCms.Loading.hide();
				$("#ajaxList").setTemplateElement("tplList"+_t, null, {filter_data: true});
				$("#ajaxList").processTemplate(d);
				$("#ajaxYM").html(d.returnval);
				break;
			}
		}
	});
}
</script>

</head>
<body>
<textarea id="tplList1" style="display:none"><table class="listtable" cellspacing="0" cellpadding="0" border="0" style="width:100%;border-collapse:collapse;">
	<tr>
		<th scope="col" width="*">分类</th>
		<th scope="col" style="width:100px;">总篇数</th>
		<th scope="col" style="width:150px;">总字数</th>
	</tr>
	{#foreach $T.table as record}
	<tr onMouseOver="this.style.backgroundColor='F3F7FF'" onMouseOut="this.style.backgroundColor='FFFFFF'">
		<td align="left">
			{$T.record.classname}
		</td>
		<td align="center">
			{$T.record.classcontentcount}
		</td>
		<td align="center">
		    	{#if $T.record.classcontentcount != "0"}
			{$T.record.classsumword}
			{#else}
			0
			{#/if}
		</td>
	</tr>
	{#/for}
	<tr>
		<td align="center">
			<font color="red">合计</font>
		</td>
		<td align="center">
			{$T.contentcount}
		</td>
		<td align="center">
			{$T.sumword}
		</td>
	</tr>
</table>
<div id="ajaxYM" style="font-size:14px;margin:20px auto;text-align:center;"></div></textarea>
<textarea id="tplList2" style="display:none"><table class="listtable" cellspacing="0" cellpadding="0" border="0" style="width:100%;border-collapse:collapse;">
	<tr>
		<th scope="col" width="*">译者</th>
		<th scope="col" style="width:100px;">总篇数</th>
		<th scope="col" style="width:150px;">总字数</th>
	</tr>
	{#foreach $T.table as record}
	{#if $T.record.writercontentcount != "0"}
	<tr onMouseOver="this.style.backgroundColor='F3F7FF'" onMouseOut="this.style.backgroundColor='FFFFFF'">
		<td align="left">
		    	{#if $T.record.writerid != "0"}
			{$T.record.writername}(成员)
			{#else}
			{$T.record.writername}
			{#/if}
		</td>
		<td align="center">
			{$T.record.writercontentcount}
		</td>
		<td align="center">
			{$T.record.writersumword}
		</td>
	</tr>
	{#/if}
	{#/for}
	<tr>
		<td align="center">
			<font color="red">合计</font>
		</td>
		<td align="center">
			{$T.contentcount}
		</td>
		<td align="center">
			{$T.sumword}
		</td>
	</tr>
</table>
<div id="ajaxYM" style="font-size:14px;margin:20px auto;text-align:center;"></div></textarea>
<div id="ajaxList"></div>
</body>
</html>
